|
1: |
|
eq(0,0) |
→ true |
2: |
|
eq(0,s(m)) |
→ false |
3: |
|
eq(s(n),0) |
→ false |
4: |
|
eq(s(n),s(m)) |
→ eq(n,m) |
5: |
|
le(0,m) |
→ true |
6: |
|
le(s(n),0) |
→ false |
7: |
|
le(s(n),s(m)) |
→ le(n,m) |
8: |
|
min(cons(0,nil)) |
→ 0 |
9: |
|
min(cons(s(n),nil)) |
→ s(n) |
10: |
|
min(cons(n,cons(m,x))) |
→ if_min(le(n,m),cons(n,cons(m,x))) |
11: |
|
if_min(true,cons(n,cons(m,x))) |
→ min(cons(n,x)) |
12: |
|
if_min(false,cons(n,cons(m,x))) |
→ min(cons(m,x)) |
13: |
|
replace(n,m,nil) |
→ nil |
14: |
|
replace(n,m,cons(k,x)) |
→ if_replace(eq(n,k),n,m,cons(k,x)) |
15: |
|
if_replace(true,n,m,cons(k,x)) |
→ cons(m,x) |
16: |
|
if_replace(false,n,m,cons(k,x)) |
→ cons(k,replace(n,m,x)) |
17: |
|
sort(nil) |
→ nil |
18: |
|
sort(cons(n,x)) |
→ cons(min(cons(n,x)),sort(replace(min(cons(n,x)),n,x))) |
|
There are 12 dependency pairs:
|
19: |
|
EQ(s(n),s(m)) |
→ EQ(n,m) |
20: |
|
LE(s(n),s(m)) |
→ LE(n,m) |
21: |
|
MIN(cons(n,cons(m,x))) |
→ IF_MIN(le(n,m),cons(n,cons(m,x))) |
22: |
|
MIN(cons(n,cons(m,x))) |
→ LE(n,m) |
23: |
|
IF_MIN(true,cons(n,cons(m,x))) |
→ MIN(cons(n,x)) |
24: |
|
IF_MIN(false,cons(n,cons(m,x))) |
→ MIN(cons(m,x)) |
25: |
|
REPLACE(n,m,cons(k,x)) |
→ IF_REPLACE(eq(n,k),n,m,cons(k,x)) |
26: |
|
REPLACE(n,m,cons(k,x)) |
→ EQ(n,k) |
27: |
|
IF_REPLACE(false,n,m,cons(k,x)) |
→ REPLACE(n,m,x) |
28: |
|
SORT(cons(n,x)) |
→ SORT(replace(min(cons(n,x)),n,x)) |
29: |
|
SORT(cons(n,x)) |
→ REPLACE(min(cons(n,x)),n,x) |
30: |
|
SORT(cons(n,x)) |
→ MIN(cons(n,x)) |
|
The approximated dependency graph contains 5 SCCs:
{19},
{20},
{21,23,24},
{25,27}
and {28}.